import request from '@/utils/request'

// 统一前缀
var prefix = '/courseService'

// 查询课程节点
export function lookNode(courseId) {
  return request({
    url: `${prefix}/courseNode/list`,
    method: 'GET',
    params: courseId,
  })
}

// 新增一条课节表信息
export function addOneCourseNode(node) {
  return request({
    url: `${prefix}/courseNode`,
    method: 'POST',
    data: node,
  })
}

// 修改一条课节表信息
export function updateOneCourseNode(node) {
  return request({
    url: `${prefix}/courseNode`,
    method: 'PUT',
    data: node,
  })
}

// 删除课节表信息
export function deleteCourseNodes(ids) {
  return request({
    url: `${prefix}/courseNode`,
    method: 'DELETE',
    data: ids,
  })
}
